@model ZKEACMS.Article.ViewModel.ArticleDetailViewModel
@{
    Style.Reqiured("Article").AtHead();
}
@if (Model != null && Model.Current != null)
{
    <div class="article-detail">
        <div class="page-header">
            <h1 class="align-center">
                @Model.Current.Title
            </h1>
            <div class="align-right">
                <span>
                    <i class="glyphicon glyphicon-eye-open"></i>
                    @(Model.Current.Counter ?? 1)
                </span>
                <span>
                    <i class="glyphicon glyphicon-user"></i>
                    @Model.Current.CreatebyName
                </span>
                <span>
                    <i class="glyphicon glyphicon-calendar"></i>
                    @((Model.Current.PublishDate ?? DateTime.Now).ToString("yyyy/MM/dd"))
                </span>
                @if (Authorizer.Authorize(ZKEACMS.Article.PermissionKeys.ManageArticle) && Model.Current.ID > 0)
                {
                    <a href="@Url.Action("Edit", "Article", new { id = Model.Current.ID,ReturnUrl=ViewContext.HttpContext.Request.Path })">@L("编辑")</a>
                }
            </div>
        </div>
        <div class="panel-body detail clearfix">
            @if (Model.Current.ImageUrl.IsNotNullAndWhiteSpace())
            {
                <img class="thumbnail" src="@Url.Content(Model.Current.ImageUrl)" alt="@Model.Current.Title" />
            }
            @Html.Raw(Model.Current.ArticleContent)
        </div>
        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-6">
                    @if (Model.Prev != null)
                    {
                        <span>
                            @L("上一篇:")
                        </span>
                        <a href="@Url.PostUrl(ViewContext.RouteData.GetPath(), Model.Prev)">
                            @Model.Prev.Title
                        </a>
                    }

                </div>
                <div class="col-sm-6 text-right">
                    @if (Model.Next != null)
                    {
                        <span>
                            @L("下一篇:")
                        </span>
                        <a href="@Url.PostUrl(ViewContext.RouteData.GetPath(), Model.Next)">
                            @Model.Next.Title
                        </a>
                    }
                </div>
            </div>
        </div>
    </div>
}

